home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 003 / sox_1 / sox / txt / sox
Text File  |  1994-06-05  |  13KB  |  459 lines

  1.  
  2.  
  3.  
  4.      SOX(1)               UNIX System V            SOX(1)
  5.  
  6.  
  7.  
  8.      NAME
  9.       sox - SOund eXchange - universal sound sample translator
  10.  
  11.      SYNOPSIS
  12.       sox infile outfile
  13.       sox infile outfile [effect [effect options...] ]
  14.       sox infile -e effect [effect options...]
  15.       sox [general options] [format options] ifile
  16.           [format options] ofile [effect [effect options...] ]
  17.       General options:  [ -V ] [ -v volume ]
  18.       Format options:  [ -t filetype ] [ -r rate ] [ -s/-u/-U/-A ]
  19.       [ -b/-w/-l/-f/-d/-D ] [ -c channels ] [ -x ]
  20.       Effects:
  21.            copy
  22.            rate
  23.            avg
  24.            stat
  25.            echo delay volume [ delay volume ... ]
  26.            vibro speed [ depth ]
  27.            lowp center
  28.            highp center
  29.            band [ -n ] center [ width ]
  30.  
  31.      DESCRIPTION
  32.       Sox translates sound files from one format to another,
  33.       possibly doing a sound effect.
  34.  
  35.      OPTIONS
  36.       The option syntax is a little grotty, but in essence:
  37.            sox file.au file.voc
  38.       translates a sound sample in SUN Sparc .AU format into a
  39.       SoundBlaster .VOC file, while
  40.            sox -v 0.5 file.au -rate 12000 file.voc rate
  41.       does the same format translation but also lowers the
  42.       amplitude by 1/2 and changes the sampling rate from 8000
  43.       hertz to 12000 hertz via the rate sound effect loop.
  44.  
  45.       File type options:
  46.  
  47.       -t filetype
  48.             gives the type of the sound sample file.
  49.  
  50.       -r rate   Give sample rate in Hertz of file.
  51.  
  52.       -s/-u/-U/-A
  53.             The sample data is signed linear (2's complement),
  54.             unsigned linear, U-law (logarithmic), or A-law
  55.             (logarithmic).  U-law and A-law are the U.S. and
  56.             international standards for logarithmic telephone
  57.             sound compression.
  58.  
  59.       -b/-w/-l/-f/-d/-D
  60.  
  61.  
  62.  
  63.      Page 1                          (printed 6/3/93)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SOX(1)               UNIX System V            SOX(1)
  71.  
  72.  
  73.  
  74.             The sample data is in bytes, 16-bit words, 32-bit
  75.             longwords, 32-bit floats, 64-bit double floats, or
  76.             80-bit IEEE floats.  Floats and double floats are
  77.             in native machine format.
  78.  
  79.       -x     The sample data is in XINU format; that is, it
  80.             comes from a machine with the opposite word order
  81.             than yours and must be swapped according to the
  82.             word-size given above.  Only 16-bit and 32-bit
  83.             integer data may be swapped.  Machine-format
  84.             floating-point data is not portable. IEEE floats
  85.             are a fixed, portable format. ???
  86.  
  87.       -c channels
  88.             The number of sound channels in the data file.
  89.             This may be 1, 2, or 4; for mono, stereo, or quad
  90.             sound data.
  91.  
  92.       General options:
  93.  
  94.       -e     after the input file allows you to avoid giving an
  95.             output file and just name an effect.  This is only
  96.             useful with the stat effect.
  97.  
  98.       -v volume Change amplitude (floating point); less than 1.0
  99.             decreases, greater than 1.0 increases.  Note: we
  100.             perceive volume logarithmically, not linearly.
  101.             Note: see the stat effect.
  102.  
  103.       -V     Print a description of processing phases.  Useful
  104.             for figuring out exactly how sox is mangling your
  105.             sound samples.
  106.  
  107.       The input and output files may be standard input and output.
  108.       This is specified by '-'.  The -t type option must be given
  109.       in this case, else sox will not know the format of the given
  110.       file.  The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  111.       options refer to the input data when given before the input
  112.       file name.  After, they refer to the output data.
  113.  
  114.       If you don't give an output file name, sox will just read
  115.       the input file.  This is useful for validating structured
  116.       file formats; the stat effect may also be used via the -e
  117.       option.
  118.  
  119.      FILE TYPES
  120.       Sox needs to know the formats of the input and output files.
  121.       File formats which have headers are checked, if that header
  122.       doesn't seem right, the program exits with an appropriate
  123.       message.  Currently, raw (no header) binary and textual
  124.       data, IRCAM Sound Files, Sound Blaster, SPARC .AU
  125.       (w/header), Mac HCOM, PC/DOS .SOU, Sndtool, and Sounder,
  126.  
  127.  
  128.  
  129.      Page 2                          (printed 6/3/93)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      SOX(1)               UNIX System V            SOX(1)
  137.  
  138.  
  139.  
  140.       NeXT .SND, Windows 3.1 RIFF/WAV, Turtle Beach .SMP, CD-R,
  141.       and Apple/SGI AIFF and 8SVX formats are supported.
  142.  
  143.       .aiff        AIFF files used on Apple IIc/IIgs and SGI. Note:
  144.             the AIFF format supports only one SSND chunk.  It
  145.             does not support multiple sound chunks, or the
  146.             8SVX musical instrument description format.  AIFF
  147.             files are multimedia archives and and can have
  148.             multiple audio and picture chunks. You may need a
  149.             separate archiver to work with them.
  150.  
  151.       .au        SUN Microsystems AU files. There are apparently
  152.             many types of .au files; DEC has invented its own
  153.             with a different magic number and word order. The
  154.             .au handler can read these files but will not
  155.             write them.  Some .au files have valid AU headers
  156.             and some do not.  The latter are probably original
  157.             SUN u-law 8000 hz samples. These can be dealt
  158.             with using the .ul format (see below).
  159.  
  160.       .hcom        Macintosh HCOM files.  These are (apparently) Mac
  161.             FSSD files with some variant of Huffman
  162.             compression.  The Macintosh has wacky file formats
  163.             and this format handler apparently doesn't handle
  164.             all the ones it should.  Mac users will need your
  165.             usual arsenal of file converters to deal with an
  166.             HCOM file under Unix or DOS.
  167.  
  168.       .raw        Raw files (no header).
  169.             The sample rate, size (byte, word, etc), and style
  170.             (signed, unsigned, etc.)  of the sample file must
  171.             be given.  The number of channels defaults to 1.
  172.  
  173.       .ub, .sb, .uw, .sw, .ul
  174.             These are several suffices which serve as a
  175.             shorthand for raw files with a given size and
  176.             style.  Thus, ub, sb, uw, sw, and ul correspond to
  177.             "unsigned byte", "signed byte", "unsigned word",
  178.             "signed word", and "ulaw" (byte).  The sample rate
  179.             defaults to 8000 hz if not explicitly set, and the
  180.             number of channels (as always) defaults to 1.
  181.             There are lots of Sparc samples floating around in
  182.             u-law format with no header and fixed at a sample
  183.             rate of 8000 hz.  (Certain sound management
  184.             software cheerfully ignores the headers.)
  185.             Similarly, most Mac sound files are in unsigned
  186.             byte format with a sample rate of 11025 or 22050
  187.             hz.
  188.  
  189.       .sf        IRCAM Sound Files.
  190.             SoundFiles are used by academic music software
  191.             such as the CSound package, and the MixView sound
  192.  
  193.  
  194.  
  195.      Page 3                          (printed 6/3/93)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      SOX(1)               UNIX System V            SOX(1)
  203.  
  204.  
  205.  
  206.             sample editor.
  207.  
  208.       .voc        Sound Blaster VOC files.
  209.             VOC files are multi-part and contain silence
  210.             parts, looping, and different sample rates for
  211.             different chunks.  On input, the silence parts are
  212.             filled out, loops are rejected, and sample data
  213.             with a new sample rate is rejected.  Silence with
  214.             a different sample rate is generated
  215.             appropriately.  On output, silence is not
  216.             detected, nor are impossible sample rates.
  217.  
  218.       .auto        This is a ``meta-type'': specifying this type for
  219.             an input file triggers some code that tries to
  220.             guess the real type by looking for magic words in
  221.             the header.  If the type can't be guessed, the
  222.             program exits with an error message.  The input
  223.             must be a plain file, not a pipe.  This type can't
  224.             be used for output files.
  225.  
  226.       .cdr        CD-R
  227.             CD-R files are used in mastering music Compact
  228.             Disks.  The file format is, as you might expect,
  229.             raw stereo raw unsigned samples at 44khz.  But,
  230.             there's some blocking/padding oddity in the
  231.             format, so it needs its own handler.
  232.  
  233.       .dat        Text Data files
  234.             These files contain a textual representation of
  235.             the sample data.  There is one line at the
  236.             beginning that contains the sample rate.
  237.             Subsequent lines contain two numeric data items:
  238.             the time since the beginning of the sample and the
  239.             sample value.  Values are normalized so that the
  240.             maximum and minimum are 1.00 and -1.00.  This file
  241.             format can be used to create data files for
  242.             external programs such as FFT analyzers or graph
  243.             routines.  SOX can also convert a file in this
  244.             format back into one of the other file formats.
  245.  
  246.       .smp        Turtle Beach SampleVision files.
  247.             SMP files are for use with the PC-DOS package
  248.             SampleVision by Turtle Beach Softworks. This
  249.             package is for communication to several MIDI
  250.             samplers. All sample rates are supported by the
  251.             package, although not all are supported by the
  252.             samplers themselves. Currently loop points are
  253.             ignored.
  254.  
  255.       .wav        Windows 3.1 .WAV RIFF files.
  256.             These appear to be very similar to IFF files, but
  257.             not the same. They are the native sound file
  258.  
  259.  
  260.  
  261.      Page 4                          (printed 6/3/93)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      SOX(1)               UNIX System V            SOX(1)
  269.  
  270.  
  271.  
  272.             format of Windows 3.1.  Obviously, Windows 3.1 is
  273.             of such incredible importance to the computer
  274.             industry that it just had to have its own sound
  275.             file format.
  276.  
  277.      EFFECTS
  278.       Only one effect from the palette may be applied to a sound
  279.       sample.  To do multiple effects you'll need to run sox in a
  280.       pipeline.
  281.  
  282.       copy                Copy the input file to the
  283.                     output file.  This is the
  284.                     default effect if both files
  285.                     have the same sampling rate,
  286.                     or the rates are "close".
  287.  
  288.       rate                Translate input sampling rate
  289.                     to output sampling rate via
  290.                     linear interpolation to the
  291.                     Least Common Multiple of the
  292.                     two sampling rates.  This is
  293.                     the default effect if the two
  294.                     files have different sampling
  295.                     rates. This is fast but
  296.                     noisy: the spectrum of the
  297.                     original sound will be shifted
  298.                     upwards and duplicated faintly
  299.                     when up-translating by a
  300.                     multiple.
  301.  
  302.       avg                Mix 4- or 2-channel sound file
  303.                     into 2- or 1-channel file by
  304.                     averaging the samples for
  305.                     different speakers.
  306.  
  307.       stat                Do a statistical check on the
  308.                     input file, and print results
  309.                     on the standard error file.
  310.                     stat may copy the file
  311.                     untouched from input to
  312.                     output, if you select an
  313.                     output file. The "Volume
  314.                     Adjustment:" field in the
  315.                     statistics gives you the
  316.                     argument to the -v number
  317.                     which will make the sample as
  318.                     loud as possible.
  319.  
  320.       echo [ delay volume ...  ]    Add echoing to a sound sample.
  321.                     Each delay/volume pair gives
  322.                     the delay in seconds and the
  323.                     volume (relative to 1.0) of
  324.  
  325.  
  326.  
  327.      Page 5                          (printed 6/3/93)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      SOX(1)               UNIX System V            SOX(1)
  335.  
  336.  
  337.  
  338.                     that echo.  If the volumes add
  339.                     up to more than 1.0, the sound
  340.                     will melt down instead of
  341.                     fading away.
  342.  
  343.       vibro speed  [ depth ]    Add the world-famous Fender
  344.                     Vibro-Champ sound effect to a
  345.                     sound sample by using a sine
  346.                     wave as the volume knob.
  347.                     Speed gives the Hertz value of
  348.                     the wave.  This must be under
  349.                     30.  Depth gives the amount
  350.                     the volume is cut into by the
  351.                     sine wave, ranging 0.0 to 1.0
  352.                     and defaulting to 0.5.
  353.  
  354.       lowp center            Apply a low-pass filter.  The
  355.                     frequency response drops
  356.                     logarithmically with center
  357.                     frequency in the middle of the
  358.                     drop.  The slope of the filter
  359.                     is quite gentle.
  360.  
  361.       highp    center            Apply a high-pass filter.  The
  362.                     frequency response drops
  363.                     logarithmically with center
  364.                     frequency in the middle of the
  365.                     drop.  The slope of the filter
  366.                     is quite gentle.
  367.  
  368.       band [ -n ] center [ width ]    Apply a band-pass filter.  The
  369.                     frequency response drops
  370.                     logarithmically around the
  371.                     center frequency.  The width
  372.                     gives the slope of the drop.
  373.                     The frequencies at center +
  374.                     width and center - width will
  375.                     be half of their original
  376.                     amplitudes.  Band defaults to
  377.                     a mode oriented to pitched
  378.                     signals, i.e. voice, singing,
  379.                     or instrumental music. The -n
  380.                     (for noise) option uses the
  381.                     alternate mode for un-pitched
  382.                     signals.  Band introduces
  383.                     noise in the shape of the
  384.                     filter, i.e. peaking at the
  385.                     center frequency and settling
  386.                     around it.
  387.  
  388.       Sox enforces certain effects.  If the two files have
  389.       different sampling rates, the requested effect must be one
  390.  
  391.  
  392.  
  393.      Page 6                          (printed 6/3/93)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      SOX(1)               UNIX System V            SOX(1)
  401.  
  402.  
  403.  
  404.       of copy, or rate, If the two files have different numbers of
  405.       channels, the avg effect must be requested.
  406.  
  407.       reverse            Reverse the sound sample
  408.                     completely.  Included for
  409.                     finding Satanic subliminals.
  410.  
  411.      BUGS
  412.       The syntax is horrific.  It's very tempting to include a
  413.       default system that allows an effect name as the program
  414.       name and just pipes a sound sample from standard input to
  415.       standard output, but the problem of inputting the sample
  416.       rates makes this unworkable.
  417.  
  418.      FILES
  419.      SEE ALSO
  420.      NOTICES
  421.       The echoplex effect is:
  422.           Copyright (C) 1989 by Jef Poskanzer.
  423.           Permission to use, copy, modify, and distribute this
  424.       software and its
  425.           documentation for any purpose and without fee is hereby
  426.       granted, provided
  427.           that the above copyright notice appear in all copies and
  428.       that both that
  429.           copyright notice and this permission notice appear in
  430.       supporting
  431.           documentation.  This software is provided "as is"
  432.       without express or
  433.           implied warranty.
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.      Page 7                          (printed 6/3/93)